<include file="Public/header" />
     <link rel="stylesheet" href="__ROOT__/public/home/css/bootstrapValidator.min.css"> 
    <link rel="stylesheet" href="__ROOT__/public/home/css/sign.css">

    <section class="sign">
        <div class="container">
            <div class="sign-content">
                <div class="title">
                    <i></i>
                    <span>注册</span>
                </div>
                <form id="regForm" class="form-horizontal clear" action="{:U('Register/Register')}" method="post">

                    <div class="form-group">
                        <label class="reg1" for=""></label>

                        <input class="form-control" type="text" name="realname" placeholder="请输入真实姓名">

                    </div>


                    <div class="form-group" id="ap">
                        <label class="reg2 i1" for=""></label>

                        <input class="form-control" type="text" name="tel" placeholder="请输入手机号">

                    </div>

                    <div class="form-group" >
                        <label class="reg5" for=""></label>
                        <div class="input-group">
                            <input class="form-control revf" type="text" name="verify" placeholder="请输入验证码">
                            <span class="input-group-addon v-code">获取验证码</span>
                            <input type="hidden" id="s-code" value="{:U('Register/SendSMS')}">
                        </div>
                    </div>


                    <div class="form-group">
                        <label class="reg3 i2" for=""></label>

                        <input class="form-control" type="password" name="password" placeholder="请输入密码">

                    </div>

                    <div class="form-group">
                        <label class="reg4 i2" for=""></label>

                        <input class="form-control" type="password" name="confirmPassword" placeholder="请再次输入密码">

                    </div>

                   
                    <div class="form-group">
                        <label class="reg6" for=""></label>

                        <input class="form-control" type="submit"  name="" value="注册">

                    </div>

                    <div class="form-group pro">
                        <p>点击注册即表示您同意<a href="{:U('Index/Protocol_user')}">《用户协议》</a></p>
                    </div>

                </form>
            </div>
        </div>
    </section>

    <include file="Public/footer" />
  


    <script src="__ROOT__/public/home/js/bootstrapValidator.min.js"></script>
    <script src="__ROOT__/public/home/js/register.js"></script>
    <script type="text/javascript">
        
        $(function(){
            $("#regForm").submit(function(){
                var datas=$("#regForm").serialize();
                var url=$(this).attr('action');
                $.ajax({
                    type:'post',
                    url:url,
                    async:false,
                    data:datas,
                    dataType:'json',
                    success:function(msg){
                        if(msg.code==1){
                            alert(msg.msg);
                            window.location.href="/";
                        }else{
                            alert(msg.msg);
                        }
                    }
                })

                return false;
            })
        })

    </script>

